html:div(class='bbt-prefs-1col')
  label &better-bibtex_preferences_auto-export_explanation;

  html:div
    label(bbt:preference='extensions.zotero.translators.better-bibtex.autoExport') &better-bibtex_preferences_auto-export;
    menulist(preference='extensions.zotero.translators.better-bibtex.autoExport')
      menupopup
        menuitem(value='immediate' label='&better-bibtex_preferences_auto-export_immediate.label;')
        menuitem(value='idle' label='&better-bibtex_preferences_auto-export_idle.label;')
        menuitem(value='off' label='&better-bibtex_preferences_auto-export_off.label;')
  html:div
    label(bbt:preference='extensions.zotero.translators.better-bibtex.autoExportDelay') &better-bibtex_preferences_auto-export_delay;
    html:input(type='range' min='2' max='300' preference='extensions.zotero.translators.better-bibtex.autoExportDelay')/
    textbox(preference='extensions.zotero.translators.better-bibtex.autoExportDelay' size='3' rows=1 readonly='true')
    label &better-bibtex_units_seconds;

html:div#bbt-prefs-auto-exports(class='bbt-prefs-2col')
  menulist#bbt-prefs-auto-export-select(class='bbt-prefs-2col-span' oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.refresh()')
    menupopup

  label(data-ae-field='type')
  textbox.plain(readonly='true' value='' data-ae-field='name')

  label &better-bibtex_preferences_auto-export_status;
  textbox.plain(size='80' readonly='true' value='' data-ae-field='status')

  label &better-bibtex_preferences_auto-export_updated;
  textbox.plain(size='80' readonly='true' value='' data-ae-field='updated')

  label &better-bibtex_preferences_auto-export_translator;
  textbox.plain(readonly='true' value='' data-ae-field='translator')

  label &better-bibtex_preferences_auto-export_target;
  textbox.plain(size='80' readonly='true' value='' data-ae-field='path')

  // bibtex
  html:div.bbt-autoexport-options.bbt-autoexport-BetterBibTeX(class='bbt-prefs-2col-span')
    label.bbt-autoexport-options.bbt-autoexport-BetterBibTeX &better-bibtex_preferences_export_bibtex_urls;
    menulist(data-ae-field='bibtexURL' oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)')
      menupopup
        menuitem(value='off' label='&better-bibtex_preferences_export_bibtex_urls_off.label;')
        menuitem(value='note' label='&better-bibtex_preferences_export_bibtex_urls_note.label;')
        menuitem(value='note-url-ish' label='&better-bibtex_preferences_export_bibtex_urls_note-url-ish.label;')
        menuitem(value='url' label='&better-bibtex_preferences_export_bibtex_urls_url.label;')
        menuitem(value='url-ish' label='&better-bibtex_preferences_export_bibtex_urls_url-ish.label;')
    image(tooltip='bbt-tooltip-bibtexURL' src='chrome://zotero-better-bibtex/content/skin/attention.svg' width='16' height='16')

  // biblatex
  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibLaTeX(
    class='bbt-prefs-2col-span'
    data-ae-field='asciiBibLaTeX'
    label='&better-bibtex_preferences_export_biblatex_ascii.label;'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
  )
  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibLaTeX(
    class='bbt-prefs-2col-span'
    data-ae-field='biblatexExtendedNameFormat'
    label='&better-bibtex_preferences_export_biblatex_extended-name-format.label;'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
  )

  // both bibtex and biblatex
  html:div.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-autoexport-BetterBibLaTeX(class='bbt-prefs-2col-span')
    label &better-bibtex_preferences_export_fields_doi-and-url;
    menulist(data-ae-field='DOIandURL' oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)')
      menupopup
        menuitem(value='both' label='&better-bibtex_preferences_export_fields_doi-and-url_both.label;')
        menuitem(value='doi' label='&better-bibtex_preferences_export_fields_doi-and-url_doi.label;')
        menuitem(value='url' label='&better-bibtex_preferences_export_fields_doi-and-url_url.label;')

  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-autoexport-BetterBibLaTeX(
    class='bbt-prefs-2col-span'
    data-ae-field='exportNotes'
    label='&better-bibtex_preferences_auto-export_fields_notes.label;'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
  )
  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-autoexport-BetterBibLaTeX(
    class='bbt-prefs-2col-span'
    data-ae-field='useJournalAbbreviation'
    label='&better-bibtex_preferences_auto-export_fields_journal-abbrev.label;'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
  )

  // all
  checkbox(
    class='bbt-prefs-2col-span'
    data-ae-field='recursive'
    label='&better-bibtex_preferences_auto-export_fields_recursive.label;'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
  )

  html:div(class='bbt-prefs-2col-span')
    button(label='&better-bibtex_preferences_auto-export_remove.label;' oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.remove()')
    button(label='&better-bibtex_preferences_auto-export_run.label;' oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.run()')
    button(label='&better-bibtex_preferences_auto-export_fields_cached.label;' oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.refresh()')
    textbox.plain(readonly='true' value='' data-ae-field='cacherate')
